<#include "../header.html">
<script type="text/javascript">
	function checkSubmit(status) {
		var oldAuditStatus = $("#oldAuditStatus").val();
		var newAuditStatus = status;
		var msg ;
		if(status!=0) {
			if (status <= oldAuditStatus || status > 4) {
				alert("设置错误");
				return false;
			}
			if (status == 1) {
				msg = "您确认同意该提现请求?";
			} else if (status == 2) {
				msg = "您确认同意该提现开始打款?";
			} else if (status == 3) {
				msg = "您确认同意该提现已经打款?";
			} else if (status == 4) {
				msg = "您确认拒绝该提现请求?";
			} else {
				alert("设置错误");
				return false;
			}
		}else{
			msg = "您确认维持现状?";
			newAuditStatus = oldAuditStatus;
		}
		$("#newAuditStatus").val(newAuditStatus);
		var remark = $("#remark").val();
		if(remark==''){
			alert("请输入审核说明");
			return false;
		}
		if(window.confirm(msg)){
			return true;
		}else{
			return false;
		}
	}
</script>
<div class="c_nav">
	<span>管理选项：</span>
	<a href="recordAction.do?method=queryWithdrawList">管理首页</a>
	<a href="javascript:location.reload()"> | [刷新页面]</a>
</div>
<div class="c_box bg_white">
<form id="addForm" name="addForm" action="recordAction.do?method=saveWithdrawAudit" method="post">
	<div class="c_topic">审核提现</div>
	<input type="hidden" name="recordId" id="recordId" value="${record.ID!}"/>
	<input type="hidden" name="oldAuditStatus" id="oldAuditStatus" value="${auditStatus!}"/>
	<input type="hidden" name="newAuditStatus" id="newAuditStatus" value=""/>
	<div class="c_form_3 c_form-label-8">
	<ul class="l_mb">
		<li>
			<span class="e_label ">用户账号：</span>
			<span class="e_input">
				<input type="text"  desc="用户账号" readonly="readonly"  value="${record.ACCOUNT!}"/>
			</span>
		</li>
		<li>
			<span class="e_label">用户名称：</span>
			<span class="e_input">
				<input type="text" readonly="readonly" desc="用户名称"    value="${record.USER_NAME!}" />
			</span>
		</li>
		<li>
			<span class="e_label">提现编号：</span>
			<span class="e_input">
				<input type="text" readonly="readonly" desc="提现编号"    value="${record.CFNUMBER!}" />
			</span>
		</li>
	</ul>
	<ul class="l_mb">
		<li>
			<span class="e_label">提现油票：</span>
			<span class="e_input">
				<input type="text"  desc="提现油票" readonly="readonly"   value="${record.AMOUNT/100.0!}"/>
			</span>
		</li>
		<li>
			<span class="e_label ">提现金额：</span>
			<span class="e_input">
				<input type="text" readonly="readonly" desc="提现金额"  value="${record.USER_NAME!}" />
			</span>
		</li>
		<li>
			<span class="e_label ">状态：</span>
			<span class="e_input">
				<input type="text" readonly="readonly" desc="状态" <#list statusList as t><#if record.STATUS?string == t.dataCode?string> value="${t.dataName!}" </#if></#list>  />
		</span>
		</li>
	</ul>
	<ul class="l_mb">
		<li>
			<span class="e_label">开户人：</span>
			<span class="e_input">
			<input type="text"  desc="开户人" readonly="readonly"   value="${record.CARD_NAME!}"/>
		</span>
		</li>
		<li>
			<span class="e_label ">开户行：</span>
			<span class="e_input">
			<input type="text" readonly="readonly" desc="开户行"  value="${record.CARD_TYPE!}" />
		</span>
		</li>
		<li>
			<span class="e_label ">银行卡：</span>
			<span class="e_input">
			<input type="text" readonly="readonly" desc="银行卡" value="${record.CARD_NUMBER!}"   />
		</span>
		</li>
	</ul>
	<ul class="c_form_3 c_form-label-8 l_mb">
		<li>
			<span class="e_label ">提现时间：</span>
			<span class="e_input">
				<input type="text" readonly="readonly" desc="提现时间"  value="${record.ADD_DATE!}" />
			</span>
		</li>
		<li>
			<span class="e_label e_label-required">提现说明：</span>
			<span class="e_textarea">
			<textarea readonly="readonly" >${record.REMARK!}</textarea>
		</span>
		</li>
	</ul>
	<ul class="l_mb">
		<li>
			<span class="e_label">审核状态：</span>
			<span class="e_input">
				<input type="text"  desc="审核状态" readonly="readonly"   value="${record.AUDIT_STATUS_NAME!}"/>
			</span>
		</li>
		<li>
			<span class="e_label ">上次审核人：</span>
			<span class="e_input">
				<input type="text" readonly="readonly" desc="审核人"  value="${record.AUDIT_UPDATE_USER!}" />
			</span>
		</li>
		<li>
			<span class="e_label ">审核时间：</span>
			<span class="e_input">
				<input type="text" readonly="readonly" desc="审核时间"  value="<#if record.AUDIT_UPDATE_TIME?? && record.AUDIT_UPDATE_TIME gt 0> ${record.AUDIT_UPDATE_TIME?number_to_datetime!}</#if>" />
			</span>
		</li>
	</ul>
	<#if auditStatus lt 3>
	<ul class="c_form_3 c_form-label-8 l_mb">
		<li>
			<span class="e_label e_label-required">审核说明：</span>
			<span class="e_textarea">
				<textarea name="remark" id="remark" maxlen="255" maxlength="255" nullable="no"></textarea>
			</span>
		</li>
	</ul>
	</#if>
	</div>
	<div class="e_center">
		<#if auditStatus == 0>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(1)" class="e_btn-page">同意</button>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(0)" class="e_btn-cancel">维持状态</button>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(2)" class="e_btn">同意并开始打款</button>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(4)" class="e_btn-form">拒绝</button>
		<#elseif auditStatus == 1>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(2)" class="e_btn-page">开始打款</button>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(0)" class="e_btn-cancel">维持状态</button>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(4)" class="e_btn-form">拒绝</button>
		<#elseif auditStatus == 2>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(3)" class="e_btn-page">打款完成</button>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(0)" class="e_btn-cancel">维持状态</button>
			<button type="button" bind="" bindForm="addForm" tradeAction="checkSubmit(4)" class="e_btn-form">拒绝</button>
		</#if>
	</div>
</form>
<#if stateList??>
<div class="c_box bg_white">
	<div class="c_topic">审核列表</div>
	<div class="c_table e_center l_mt">
		<table>
			<thead>
			<tr>
				<th>审核人</th>
				<th>状态</th>
				<th>说明</th>
				<th>时间</th>
			</tr>
			</thead>
			<tbody>
			<#list stateList as state>
			<tr>
				<td>${state.OPERATION!}</td>
				<td>${state.AUDIT_STATUS_NAME!}</td>
				<td>${state.REMARK!}</td>
				<td>${state.UPDATE_TIME?number_to_datetime!}</td>
			<tr>
			</#list>
			</tbody>
		</table>
	</div>
</div>
</#if>
</div>

<#include "../footer.html">